<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<script src="./lib/echarts.min.js"></script>
		<script src="./lib/jquery.min.js"></script>
	</head>
	<body>
		<div style="width: 600px; height: 400px"></div>

		<script type="text/javascript">
			let mCharts = echarts.init(document.querySelector('div'));
			$.get('./json/map/china.json', function (ret) {
				// ret 中国各个省份的矢量地图数据
				console.log(ret);
				echarts.registerMap('chinaMap', ret);
				let option = {
					geo: {
						type: 'map',
						map: 'chinaMap',
						roam: true, //允许拖动和缩放
						label: {
							show: true, //展示标签
						},
						zoom: 1, //初始化缩放比例
						center: [125.3245, 43.886841], //设置地图中心点的坐标
					},
				};
				mCharts.setOption(option);
			});
		</script>
	</body>
</html>
